<script setup>
import dayjs from 'dayjs'
import moment from 'moment'
const now = new Date()
const nextTime = new Date('2022-09-01')

const formatTime = (time) => {
  return dayjs(time).format('YYYY-MM-DD hh:mm:ss')
}
const formatTime1 = (time) => {
  return moment(time).format('YYYY-MM-DD hh:mm:ss')
}
</script>

<template>
  <h1>Hello vue3</h1>
  <h3>{{ formatTime(now) }}</h3>
  <h3>{{ formatTime1(nextTime) }}</h3>
</template>
